<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="it">
<head>
<title>ewgi Examples</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="/www/css/default.css" />
</head>

<body>
<h1>Hello World</h1>
<p>This is the most simple application. The returned response is a plain/text string. Guess which! Hello world!</p>
<p>Click to see the result: <a href="/hello">/hello</a></p>
<iframe name="code" id="code" src="$src$" width="100%" height="190"></iframe>
<p>The handler h is called with two arguments:</p>
<ul>
  <li>the environment _Env which in this case is not used</li>
  <li>and the StartResp function</li>
</ul>
<p>h/2 prepares the Headers to send a response with Content-Type "text/plain". Calls StartResp to append headers to the output. Here the first argument is a macro corresponding to the tuple {200, "OK"} which represents the HTTP OK Status.
Finally it returns an io_list containing the response body.
</p>
<p><a href="javascript:history.back();">&lt;&lt; Back</a></p>
</body>
</html>
